package com.lvsc.sdaplacefinder.models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.GenericGenerator;

import com.lvsc.sdaplacefinder.dao.model.EntityModel;

@Entity
@XmlRootElement
public class Place implements EntityModel {

	public static final int HOTEL = 1;
	public static final int RESTAURENT = 2;
	public static final int CAFE = 3;
	public static final int CINEMA = 4;
	public static final int HOPITAL = 5;

	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	private Long id;

	private Double latitude;
	private Double longitude;
	private String name;
	private String description;
	private Integer category;
	private Float rating;

	@Temporal(TemporalType.TIMESTAMP)
	private Date created;

	public Place() {
	}

	public Place(String name, String description, Double latitude,
			Double longitude) {
		this.name = name;
		this.description = description;
		this.latitude = latitude;
		this.longitude = longitude;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Long getId() {
		return id;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public Float getRating() {
		return rating;
	}

	public void setRating(Float rating) {
		this.rating = rating;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
